package test;

import java19_1_4.Animal;

/**
 * @author yuisama
 * @date 2022/01/04 21:13
 **/
public class Dog extends Animal {
    public Dog() {}
    public Dog(String name,int age) {
        // 调用父类的有参构造，若父类中没有无参构造，必须在子类中通过super显示调用父类的有参构造。
        super(name,age);
    }
    void eat(String food) {
        System.out.println("狗狗" + this.name + "正在吃"+food);
    }

    public static void test() {
        System.out.println("test.Dog's test");
    }
}